﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using System.Windows.Forms;
using 低频天线阵列相控阵信号发生系统SmartFASK12.Controls;

namespace 低频天线阵列相控阵信号发生系统SmartFASK12
{
    internal static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            //AppDomain.CurrentDomain.AssemblyResolve += OnResolveAssembly;
           

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

        //private static Assembly OnResolveAssembly(object sender, ResolveEventArgs args)
        //{
        //    var executingAssembly = Assembly.GetExecutingAssembly();
        //    var assemblyName = new AssemblyName(args.Name);

        //    var path = assemblyName.Name + ".dll";
        //    if (assemblyName.CultureInfo.Equals(CultureInfo.InvariantCulture) == false)
        //        path = $@"{assemblyName.CultureInfo}\{path}";

        //    using (var stream = executingAssembly.GetManifestResourceStream(path))
        //    {
        //        if (stream == null)
        //            return null;

        //        var assemblyRawBytes = new byte[stream.Length];
        //        stream.Read(assemblyRawBytes, 0, assemblyRawBytes.Length);
        //        return Assembly.Load(assemblyRawBytes);
        //    }
        //}
    }
}
